package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PPermissionMapper;
import syllabus.model.Criteria;
import syllabus.model.PPermission;
import syllabus.service.PPermissionService;

@Service
public class PPermissionServiceImpl implements PPermissionService {
    @Autowired
    private PPermissionMapper pPermissionMapper;

    private static final Logger logger = LoggerFactory.getLogger(PPermissionServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pPermissionMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PPermission selectByPrimaryKey(Integer id) {
        return this.pPermissionMapper.selectByPrimaryKey(id);
    }

    public List<PPermission> selectByExample(Criteria example) {
        return this.pPermissionMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pPermissionMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PPermission record) {
        return this.pPermissionMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PPermission record) {
        return this.pPermissionMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pPermissionMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PPermission record, Criteria example) {
        return this.pPermissionMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PPermission record, Criteria example) {
        return this.pPermissionMapper.updateByExample(record, example);
    }

    public int insert(PPermission record) {
        return this.pPermissionMapper.insert(record);
    }

    public int insertSelective(PPermission record) {
        return this.pPermissionMapper.insertSelective(record);
    }

	public List<PPermission> getPermissions(Criteria c) {
		return pPermissionMapper.getPermissions(c);
	}
}